package com.spx.kernel.ui.widgets;

import org.eclipse.jface.viewers.ITableLabelProvider;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.swt.graphics.Image;

//import com.spx.core.CoreActivator;
//import com.spx.core.types.User;
import com.spx.kernel.types.ModelType;

public class ModelLabelProvider extends LabelProvider implements ITableLabelProvider
{
	public String getColumnText(Object obj, int index)
	{
		return getText(obj);
	}

	@Override
	public String getText(Object object)
	{
		final String result = ((ModelType) object).getName();
		return result;

	}

	public Image getColumnImage(Object obj, int index)
	{
		return getImage(obj);
	}

	@Override
	public Image getImage(Object object)
	{

		Image image = null;
//		if (object instanceof User)
//		{
//			image = CoreActivator.getImageDescriptor("icons/user_16.gif").createImage();
//		}

		return image;
	}
}
